﻿<local:DocumentBase x:Class="WPFExcelReport.YCACOFS"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
                    xmlns:db="clr-namespace:INTEX.DataBase"
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    xmlns:wep="clr-namespace:WPFExcelReport"
                    Height="700" Width="1024" 
                    FontSize="12"
                   Background="White"
                    Loaded="Window_Loaded"
     >
    <local:DocumentBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:TextTrimmingConverter  x:Key="Trim"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:String2ColorConverter  x:Key="str2color"/>
        <ucd:PreisConverter  x:Key="PreisConverter"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <db:SETINTEXDB  x:Key="SetData" />
        <db:SETINTEXDB  x:Key="SetProd" />
        <CollectionViewSource   x:Key="vwABCO" Source="{Binding Path=ICC_ABPOS_MCO,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwPABCO" Source="{Binding Path=ICC_ABPOS_MCO,Source={StaticResource SetProd}}" />
        <CollectionViewSource   x:Key="vwABPOS" Source="{Binding Path=ABPOS,Source={StaticResource SetProd}}" />
        <CollectionViewSource   x:Key="vwFSSTAMM" Source="{Binding Path=FSSTAMM,Source={StaticResource SetProd}}" />
        <CollectionViewSource   x:Key="vwABPOS_MAT" Source="{Binding Path=ICC_ABPOS_MAT,Source={StaticResource SetProd}}" />
        <CollectionViewSource   x:Key="vwMDECKMAT" Source="{Binding Path=ICC_MDECKMAT,Source={StaticResource SetProd}}" />
        <CollectionViewSource   x:Key="vwWDECKMAT" Source="{Binding Path=ICC_WDECKMAT,Source={StaticResource SetProd}}" />
        <CollectionViewSource   x:Key="vwFDECKMAT" Source="{Binding Path=ICC_FDECKMAT,Source={StaticResource SetProd}}" />
        <CollectionViewSource   x:Key="vwXDECK" Source="{Binding Path=ICC_ABAUFM,Source={StaticResource SetProd}}" />
    </local:DocumentBase.Resources>
    <Grid   >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="100" />
            <RowDefinition Height="*" />
            <RowDefinition Height="300" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="2*"/>
            <ColumnDefinition Width="1*" />
            <ColumnDefinition Width="1*" />
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3">
            <WrapPanel>
                <StackPanel>
                    <TextBlock FontSize="18"   Width="59"  Margin="0,0,0,0" Text="款式" />
                </StackPanel>
                <StackPanel>
                    <WrapPanel>
                        <TextBox Background="Yellow"  FontSize="18"    Width="120" Name="txtFSART" CharacterCasing="Upper" Margin="10,0,0,0" Text="" />
                        <StackPanel>
                            <Button Name="btnRefresh" Width="30" Height="30"  Click="btnRefresh_Click">
                                <Button.Background>
                                    <ImageBrush  ImageSource="Image/Reload.png" />
                                </Button.Background>
                            </Button>                            
                        </StackPanel>
                        <Button Width="Auto" Margin="10,0,0,0"  HorizontalAlignment="Left" Name="btnFilterABCO" Click="btnFilterABCO_Click">过滤</Button>
                        <Button Width="Auto"  Margin="10,0,0,0" HorizontalAlignment="Left" Name="btnFilterABCOClear" Click="btnFilterABCOClear_Click">清除</Button>
                        <Button FontSize="18" Height="30" Width="30" Margin="5,0,0,0" Name="btnPrint" Click="btnPrint_Click">
                                <Button.Background>
                                    <ImageBrush  ImageSource="Image/Print.png" />
                                </Button.Background>
                            </Button>
                        <TextBlock Margin="5,0,0,0"  VerticalAlignment="Center" >打印</TextBlock>                        
                    </WrapPanel>   
                </StackPanel>
            </WrapPanel>
        </StackPanel>
        <DockPanel  Grid.Row="1" Grid.RowSpan="2" Grid.Column="0" Grid.ColumnSpan="1" VerticalAlignment="Top" >
                <DataGrid DockPanel.Dock="Top"
                AutoGenerateColumns="False"
                EnableRowVirtualization="False"
                VerticalScrollBarVisibility="Auto"
                HorizontalScrollBarVisibility="Auto"
                HeadersVisibility="Column" 
                FontSize="12"
                IsReadOnly="True"
                HorizontalAlignment="Stretch"                    
                VerticalAlignment="Stretch"
                ItemsSource="{Binding Source={StaticResource ResourceKey=vwPABCO}}"  
                x:Name="dlgPABCO" 
                Margin="0,1,0,0"             
                RowDetailsVisibilityMode="Visible"
                    >
                <DataGrid.RowDetailsTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal" Margin="50,0,0,0" HorizontalAlignment="Left">
                            <TextBlock Foreground="Black" FontSize="12" Text="计划量"/>
                            <TextBlock Foreground="Black" FontSize="12" Text="{Binding Path=QTYP}"/>
                            <TextBlock Foreground="Black" Margin="10,0,0,0" FontSize="12" Text="S:"/>
                            <TextBlock Foreground="Black" Margin="10,0,0,0" FontSize="12" Text="{Binding Path=SP}"/>
                            <TextBlock Foreground="Black" Margin="10,0,0,0" FontSize="12" Text="M:"/>
                            <TextBlock Foreground="Black" Margin="10,0,0,0"  FontSize="12" Text="{Binding Path=MP}"/>
                            <TextBlock Foreground="Black" Margin="10,0,0,0"  FontSize="12" Text="L:"/>
                            <TextBlock Foreground="Black" Margin="10,0,0,0"  FontSize="12" Text="{Binding Path=LP}"/>
                            <TextBlock Foreground="Black" Margin="10,0,0,0"  FontSize="12" Text="XL:"/>
                            <TextBlock Foreground="Black" Margin="10,0,0,0"  FontSize="12" Text="{Binding Path=XLP}"/>
                        </StackPanel>
                    </DataTemplate>
                </DataGrid.RowDetailsTemplate>
                <DataGrid.Columns>                    
                    <DataGridTextColumn Binding="{Binding Path=ABPSPGRD}" Header="确认"   Width="30" />
                    <DataGridTextColumn Binding="{Binding Path=ABPGESSTA}" Header="状态"   Width="30" />
                    <DataGridTextColumn Binding="{Binding Path=END}" Header="结"   Width="20" />
                    <DataGridTextColumn Binding="{Binding Path=KRS}" Header=""   Width="30" />
                    <DataGridTextColumn Binding="{Binding Path=LFD,Converter={StaticResource ResourceKey=pnum}}" Header="生产单"   Width="Auto" />
                    <DataGridTextColumn Binding="{Binding Path=ART,Converter={StaticResource ResourceKey=Trim}}" Header="款式"   Width="Auto" />
                    <DataGridTextColumn Binding="{Binding Path=FARBE,Converter={StaticResource ResourceKey=Trim}}" Header="颜色"   Width="Auto" />
                    <DataGridTextColumn Binding="{Binding Path=QTY}" Header="数量"   Width="Auto"/>
                    <DataGridTextColumn Binding="{Binding Path=QTYP}" Header="计划数"   Width="Auto"/>
                    <DataGridTextColumn Binding="{Binding Path=S}" Header="S"   Width="Auto"> 
                    </DataGridTextColumn>
                    <DataGridTextColumn Binding="{Binding Path=M}" Header="M"   Width="Auto"/>
                    <DataGridTextColumn Binding="{Binding Path=L}" Header="L"   Width="Auto"/>
                    <DataGridTextColumn Binding="{Binding Path=XL}" Header="XL"   Width="Auto"/>
                    <DataGridTextColumn Binding="{Binding Path=VMQACTPEK, Converter={StaticResource ResourceKey=d100}}" Header="实际采购"   Width="Auto"/>
                    <DataGridTextColumn Binding="{Binding Path=PRODV, Converter={StaticResource ResourceKey=d100}}" Header="加工费"   Width="Auto"/>
                </DataGrid.Columns>
            </DataGrid  >
                <DataGrid 
                AutoGenerateColumns="False"
                EnableRowVirtualization="False"
                VerticalScrollBarVisibility="Auto"
                HorizontalScrollBarVisibility="Auto"
                HeadersVisibility="Column" 
                FontSize="12"
                IsReadOnly="True"
                HorizontalAlignment="Stretch"
                VerticalAlignment="Stretch"
                ItemsSource="{Binding Source={StaticResource ResourceKey=vwABCO}}"  
                x:Name="dlgABCO" 
                Margin="0,1,0,0"             
                RowDetailsVisibilityMode="Visible"
                    >
                    <DataGrid.RowDetailsTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal" Margin="50,0,0,0" HorizontalAlignment="Left">
                                <TextBlock Foreground="Black" FontSize="12" Text="计划量"/>
                                <TextBlock Foreground="Black" FontSize="12" Text="{Binding Path=QTYP}"/>
                                <TextBlock Foreground="Black" Margin="10,0,0,0" FontSize="12" Text="S:"/>
                                <TextBlock Foreground="Black" Margin="10,0,0,0" FontSize="12" Text="{Binding Path=SP}"/>
                                <TextBlock Foreground="Black" Margin="10,0,0,0" FontSize="12" Text="M:"/>
                                <TextBlock Foreground="Black" Margin="10,0,0,0"  FontSize="12" Text="{Binding Path=MP}"/>
                                <TextBlock Foreground="Black" Margin="10,0,0,0"  FontSize="12" Text="L:"/>
                                <TextBlock Foreground="Black" Margin="10,0,0,0"  FontSize="12" Text="{Binding Path=LP}"/>
                                <TextBlock Foreground="Black" Margin="10,0,0,0"  FontSize="12" Text="XL:"/>
                                <TextBlock Foreground="Black" Margin="10,0,0,0"  FontSize="12" Text="{Binding Path=XLP}"/>
                            </StackPanel>
                        </DataTemplate>
                    </DataGrid.RowDetailsTemplate>
                    <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=ABPSPGRD}" Header="确认"   Width="30" />
                        <DataGridTextColumn Binding="{Binding Path=ABPGESSTA}" Header="状态"   Width="30" />
                        <DataGridTextColumn Binding="{Binding Path=END}" Header="结"   Width="20" />
                        <DataGridTextColumn Binding="{Binding Path=KRS}" Header=""   Width="30" />
                        <DataGridTextColumn Binding="{Binding Path=LFD,Converter={StaticResource ResourceKey=pnum}}" Header="生产单"   Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=ART,Converter={StaticResource ResourceKey=Trim}}" Header="款式"   Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=FARBE,Converter={StaticResource ResourceKey=Trim}}" Header="颜色"   Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=QTY}" Header="数量"   Width="Auto"/>
                        <DataGridTextColumn Binding="{Binding Path=QTYP}" Header="计划数"   Width="Auto"/>
                        <DataGridTextColumn Binding="{Binding Path=S}" Header="S"   Width="Auto">
                        </DataGridTextColumn>
                        <DataGridTextColumn Binding="{Binding Path=M}" Header="M"   Width="Auto"/>
                        <DataGridTextColumn Binding="{Binding Path=L}" Header="L"   Width="Auto"/>
                        <DataGridTextColumn Binding="{Binding Path=XL}" Header="XL"   Width="Auto"/>
                        <!--DataGridTextColumn Binding="{Binding Path=VMQSTDPSTD, Converter={StaticResource ResourceKey=d100}}" Header="标准物料"   Width="Auto"/>
                    <DataGridTextColumn Binding="{Binding Path=VMQSTDPEK, Converter={StaticResource ResourceKey=d100}}" Header="标准采购"   Width="Auto"/>
                    <DataGridTextColumn Binding="{Binding Path=VMQSTDPPLAN, Converter={StaticResource ResourceKey=d100}}" Header="标准预测"   Width="Auto"/>
                    <DataGridTextColumn Binding="{Binding Path=VMQPLANPSTD, Converter={StaticResource ResourceKey=d100}}" Header="VMQPLANPSTD"   Width="Auto"/>
                    <DataGridTextColumn Binding="{Binding Path=VMQPLANPEK, Converter={StaticResource ResourceKey=d100}}" Header="VMQPLANPEK"   Width="Auto"/>
                    <DataGridTextColumn Binding="{Binding Path=VMQPLANPPLAN, Converter={StaticResource ResourceKey=d100}}" Header="VMQPLANPPLAN"   Width="Auto"/>
                    <DataGridTextColumn Binding="{Binding Path=VMQACTPSTD, Converter={StaticResource ResourceKey=d100}}" Header="VMQACTPSTD"   Width="Auto"/-->
                        <DataGridTextColumn Binding="{Binding Path=VMQACTPEK, Converter={StaticResource ResourceKey=d100}}" Header="实际采购"   Width="Auto"/>
                        <!--DataGridTextColumn Binding="{Binding Path=VMQACTPPLAN}" Header="VMQACTPPLAN"   Width="Auto"/-->
                        <DataGridTextColumn Binding="{Binding Path=PRODV, Converter={StaticResource ResourceKey=d100}}" Header="加工费"   Width="Auto"/>
                    </DataGrid.Columns>
                </DataGrid  >
        </DockPanel> 
        <DockPanel  Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="1" Grid.RowSpan="3">
            <StackPanel>
            <Expander Header="订单执行情况"  IsExpanded="True" ExpandDirection="Down">
                <StackPanel> 
                    <DataGrid 
                                CanUserReorderColumns="True"  
                                CanUserResizeRows="True" 
                                CanUserSortColumns="True"                  
                                AutoGenerateColumns="False"   
                                EnableRowVirtualization="False"  
                                HorizontalAlignment="Stretch" 
                                HorizontalScrollBarVisibility="Auto"
                                VerticalScrollBarVisibility="Auto"
                                IsSynchronizedWithCurrentItem="True"
                                ItemsSource="{Binding Source={StaticResource ResourceKey=vwABPOS}}"  
                                x:Name="dlgEKPOS" 
                                Margin="0,1,0,0" 
                                Height="200"
                                RowDetailsVisibilityMode="Visible"
                                >
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=ABPFARBE}" Header="颜色"   Width="60" />
                            <DataGridTextColumn Binding="{Binding Path=ABPGROE, Converter={StaticResource ResourceKey=Trim}}" Header="Z"   Width="20" />
                            <DataGridTextColumn Binding="{Binding Path=ABPERLKZ}" Header="结"   Width="30" />
                            <DataGridTextColumn Binding="{Binding Path=ABPERLDAT}" Header="日期"   Width="80" />
                            <DataGridTextColumn Binding="{Binding Path=ABPEALFM, Converter={StaticResource ResourceKey=d100}}" Header="产量"   Width="60" />
                        </DataGrid.Columns>
                    </DataGrid  >
                </StackPanel>
            </Expander>
             <Expander Header="面料消耗" IsExpanded="False" ExpandDirection="Down">
                <DataGrid 
                    CanUserReorderColumns="True"  
                    CanUserResizeRows="True" CanUserSortColumns="True"                  
                    AutoGenerateColumns="False"   
                    EnableRowVirtualization="True"  
                    RowDetailsVisibilityMode="Visible"
                    HorizontalAlignment="Stretch" 
                    VerticalAlignment="Stretch"
                    IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                    ItemsSource="{Binding Source={StaticResource ResourceKey=vwWDECKMAT}}" 
                    x:Name="dlgWDECK" 
                    Grid.ColumnSpan="4" Margin="0,1,0,0" Grid.Row="2"                   >
                    <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=ART}" Header="面料"   Width="120" />
                        <DataGridTextColumn Binding="{Binding Path=FARBE}" Header="颜色"   Width="60" />
                            <DataGridTextColumn Binding="{Binding Path=TQTY}" Header="计划"   Width="80" />
                            <DataGridTextColumn Binding="{Binding Path=QTYACT}" Header="实际"   Width="60" />
                            <DataGridTextColumn Binding="{Binding Path=UM}" Header="UM"   Width="60" />
                    </DataGrid.Columns>
                </DataGrid  >
            </Expander>
             <Expander Header="辅料消耗" IsExpanded="False" ExpandDirection="Down">
                    <DataGrid 
                    CanUserReorderColumns="True"  
                    CanUserResizeRows="True" CanUserSortColumns="True"                  
                    AutoGenerateColumns="False"     
                    EnableRowVirtualization="True"  
                    RowDetailsVisibilityMode="VisibleWhenSelected" 
                    HorizontalAlignment="Stretch" 
                    VerticalAlignment="Stretch"
                    IsSynchronizedWithCurrentItem="True" 
                    Opacity="10" Visibility="Visible"
                    ItemsSource="{Binding Source={StaticResource ResourceKey=vwFDECKMAT}}"  
                    x:Name="dlgFDECK" 
                    >
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=ART}" Header="辅料"   Width="120" />
                            <DataGridTextColumn Binding="{Binding Path=FARBE}" Header="颜色"   Width="40" />
                            <DataGridTextColumn Binding="{Binding Path=SIZE}" Header="尺寸"   Width="60" />
                            <DataGridTextColumn Binding="{Binding Path=TQTY}" Header="计划"   Width="60" />
                            <DataGridTextColumn Binding="{Binding Path=QTYACT}" Header="实际"   Width="60" />
                        </DataGrid.Columns>
                    </DataGrid  >
                </Expander>
            </StackPanel>
        </DockPanel>
        <DockPanel  Grid.Row="0" Grid.Column="2" Grid.ColumnSpan="1" Grid.RowSpan="3" >
            <StackPanel>
                <Expander FontSize="12" Header="款式信息" Name="zoneFS" IsExpanded="False" ExpandDirection="Down">
            </Expander>
                <Expander FontSize="12" Header="面料信息" Name="zoneFabric" IsExpanded="False" ExpandDirection="Down">
            </Expander>
                <Expander FontSize="12" Header="审核区域" Name="zoneMaterial" IsExpanded="False" ExpandDirection="Down">
                    <StackPanel>
                        <WrapPanel> 
                            <StackPanel>
                                <Button Height="20" Width="20" Margin="2,0,0,0" Name="btnPushQty" Click="btnPushQty_Click">
                                    <Button.Background>
                                        <ImageBrush  ImageSource="Image/Refresh.png" />
                                    </Button.Background>                                  
                                </Button> 
                            </StackPanel>
                            <TextBlock VerticalAlignment="Center">分配实际用量</TextBlock>
                            <TextBox Background="White"  FontSize="18"    Width="60" Name="txtNQTy" Height="25" Margin="10,0,0,0"  />
                        </WrapPanel>
                        <WrapPanel>
                            <TextBlock>物料:</TextBlock>
                            <TextBlock Background="LightGoldenrodYellow" Text="{Binding Path=ART, Source={StaticResource ResourceKey=vwXDECK}}" Width="80"></TextBlock>
                            <TextBlock>描述:</TextBlock>
                            <TextBlock Background="LightGoldenrodYellow"  Text="{Binding Path=ARTDES, Source={StaticResource ResourceKey=vwXDECK},Converter={StaticResource ResourceKey=gb2312}}" Width="120"></TextBlock>
                        </WrapPanel>
                        <WrapPanel>
                            <TextBlock>色号:</TextBlock>
                            <TextBlock Background="LightGoldenrodYellow"   Text="{Binding Path=COLOR, Source={StaticResource ResourceKey=vwXDECK}}" Width="60"></TextBlock>
                            <TextBlock>尺码:</TextBlock>
                            <TextBlock Background="LightGoldenrodYellow"   Text="{Binding Path=ASIZE, Source={StaticResource ResourceKey=vwXDECK},Converter={StaticResource ResourceKey=gb2312}}" Width="60"></TextBlock>
                            <TextBlock>UM:</TextBlock>
                            <TextBlock Background="LightGoldenrodYellow"   Text="{Binding Path=UM, Source={StaticResource ResourceKey=vwXDECK}}" Width="40"></TextBlock>
                        </WrapPanel>
                        <WrapPanel>
                            <TextBlock>用量:</TextBlock>
                            <TextBlock Background="LightGoldenrodYellow"   Text="{Binding Path=QTYSTD, Source={StaticResource ResourceKey=vwXDECK}}" Width="50"></TextBlock>
                            <TextBlock>计划:</TextBlock>
                            <TextBlock Background="LightGoldenrodYellow"   Text="{Binding Path=QTYPLAN, Source={StaticResource ResourceKey=vwXDECK}}" Width="50"></TextBlock>
                            <TextBlock>实际:</TextBlock>
                            <TextBox Text="{Binding Path=QTYACT, Source={StaticResource ResourceKey=vwXDECK}}" Width="50"></TextBox>
                        </WrapPanel> 
                        <WrapPanel>
                            <TextBlock>单价:</TextBlock>
                            <TextBox Text="{Binding Path=PRSTD, Source={StaticResource ResourceKey=vwXDECK}}" Width="50"></TextBox>
                            <TextBlock>采购:</TextBlock>
                            <TextBox Text="{Binding Path=PREK, Source={StaticResource ResourceKey=vwXDECK}}" Width="50"></TextBox>
                            <TextBlock>预期:</TextBlock>
                            <TextBox Text="{Binding Path=PRPLAN, Source={StaticResource ResourceKey=vwXDECK}}" Width="50"></TextBox>
                        </WrapPanel>
                        <TextBlock>标准成本:</TextBlock>
                        <WrapPanel>
                            <TextBlock Margin="10,0,0,0">标准用量*标准价格</TextBlock>
                            <TextBlock Background="LightGoldenrodYellow"   Text="{Binding Path=VQTYSTDPRSTD, Converter={StaticResource ResourceKey=d100}, Source={StaticResource ResourceKey=vwXDECK}}" Width="80"></TextBlock>
                        </WrapPanel>
                        <WrapPanel>
                            <TextBlock Margin="10,0,0,0">标准用量*采购价格</TextBlock>
                            <TextBlock Background="LightGoldenrodYellow"   Text="{Binding Path=VQTYSTDPREK, Converter={StaticResource ResourceKey=d100}, Source={StaticResource ResourceKey=vwXDECK}}" Width="80"></TextBlock>
                        </WrapPanel>
                        <WrapPanel>
                            <TextBlock Margin="10,0,0,0">标准用量*预期价格</TextBlock>
                            <TextBlock Background="LightGoldenrodYellow"   Text="{Binding Path=VQTYSTDPRPLAN, Converter={StaticResource ResourceKey=d100}, Source={StaticResource ResourceKey=vwXDECK}}" Width="80"></TextBlock>
                        </WrapPanel>
                        <TextBlock>计划成本:</TextBlock>
                        <WrapPanel>
                            <TextBlock Margin="10,0,0,0">计划用量*标准价格</TextBlock>
                            <TextBlock Background="LightGoldenrodYellow"  Text="{Binding Path=VQTYPLANPRSTD, Converter={StaticResource ResourceKey=d100}, Source={StaticResource ResourceKey=vwXDECK}}" Width="80"></TextBlock>
                        </WrapPanel>
                        <WrapPanel>
                            <TextBlock Margin="10,0,0,0">计划用量*标准价格</TextBlock>
                            <TextBlock Background="LightGoldenrodYellow"  Text="{Binding Path=VQTYPLANPREK, Converter={StaticResource ResourceKey=d100}, Source={StaticResource ResourceKey=vwXDECK}}" Width="80"></TextBlock>
                        </WrapPanel>
                        <WrapPanel>
                            <TextBlock Margin="10,0,0,0">计划用量*标准价格</TextBlock>
                            <TextBlock Background="LightGoldenrodYellow"  Text="{Binding Path=VQTYPLANPRPLAN, Converter={StaticResource ResourceKey=d100}, Source={StaticResource ResourceKey=vwXDECK}}" Width="80"></TextBlock>
                        </WrapPanel>
                        <TextBlock>实际成本:</TextBlock>
                        <WrapPanel>
                            <TextBlock Margin="10,0,0,0">实际用量*标准价格</TextBlock>
                            <TextBlock Background="LightGoldenrodYellow"  Text="{Binding Path=VQTYACTPRSTD, Converter={StaticResource ResourceKey=d100}, Source={StaticResource ResourceKey=vwXDECK}}" Width="80"></TextBlock>
                        </WrapPanel>
                        <WrapPanel>
                            <TextBlock Margin="10,0,0,0">实际用量*标准价格</TextBlock>
                            <TextBlock Background="LightGoldenrodYellow"  Text="{Binding Path=VQTYACTPREK, Converter={StaticResource ResourceKey=d100}, Source={StaticResource ResourceKey=vwXDECK}}" Width="80"></TextBlock>
                        </WrapPanel>
                        <WrapPanel>
                            <TextBlock Margin="10,0,0,0">实际用量*标准价格</TextBlock>
                            <TextBlock Background="LightGoldenrodYellow"  Text="{Binding Path=VQTYACTPRPLAN, Converter={StaticResource ResourceKey=d100}, Source={StaticResource ResourceKey=vwXDECK}}" Width="80"></TextBlock>
                        </WrapPanel>
                    </StackPanel>
            </Expander> 
            </StackPanel>
        </DockPanel>
        <DockPanel  Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="3" Grid.RowSpan="1" >
            <StackPanel>
                <WrapPanel >
                    <TextBlock  FontSize="18">物料类型:</TextBlock>
                    <TextBox  FontSize="18" Name="txtMTYPE" Width="20">F</TextBox>
                    <TextBlock  FontSize="18">物料:</TextBlock>
                    <TextBox Name="txtMART" Background="Yellow" Width="120" FontSize="18">B</TextBox>
                    <TextBlock  FontSize="18">色号:</TextBlock>
                    <TextBox Name="txtMCOLOR" Background="White" Width="60" FontSize="18"   ></TextBox>
                    <TextBlock  FontSize="18">尺码:</TextBlock>
                    <TextBox Name="txtMSIZE" Background="White" Width="60" FontSize="18"  ></TextBox>
                    <Button Width="Auto"  FontSize="18"  Margin="10,0,0,0"  HorizontalAlignment="Left" Name="btnFilterMat" Click="btnFilterMat_Click">过滤</Button>
                    <Button Width="Auto"   FontSize="18"  Margin="10,0,0,0" HorizontalAlignment="Left" Name="btnFilterMatClear" Click="btnFilterMatClear_Click">清除</Button>
                    <Button Name="btnApprove" Click="btnApprove_Click" Margin="30,0,0,0" Height="30" Width="30">
                        <Button.Background>
                            <ImageBrush  ImageSource="Image/button_ok.png" />
                        </Button.Background>
                    </Button>
                    <TextBlock Margin="10,0,0,0" VerticalAlignment="Center"  FontSize="18" >审核通过此物料</TextBlock>
                </WrapPanel>
                <DataGrid 
                                CanUserReorderColumns="True"  
                                CanUserResizeRows="True" 
                                CanUserSortColumns="True"                  
                                AutoGenerateColumns="False"   
                                EnableRowVirtualization="False"  
                                HorizontalAlignment="Stretch" 
                                HorizontalScrollBarVisibility="Auto"
                                VerticalScrollBarVisibility="Auto"
                                IsSynchronizedWithCurrentItem="True"
                                ItemsSource="{Binding Source={StaticResource ResourceKey=vwXDECK}}"  
                                x:Name="dlgXDECK" 
                                Margin="0,1,0,0" 
                                Height="300"
                                RowDetailsVisibilityMode="Visible"
                                >
                    <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=ABAVKAUFPOS,Converter={StaticResource ResourceKey=pnum}}" Header="单"   Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=UPOS}" Header="行"   Width="30" />
                        <DataGridTextColumn Binding="{Binding Path=MTYPE}" Header="类"   Width="30" />
                        <DataGridTextColumn Binding="{Binding Path=ABAART, Converter={StaticResource ResourceKey=Trim}}" Header="物料"   Width="80" />
                        <DataGridTextColumn Binding="{Binding Path=ABAFARBE, Converter={StaticResource ResourceKey=Trim}}" Header="色号"   Width="40" />
                        <DataGridTextColumn Binding="{Binding Path=ABAGROE, Converter={StaticResource ResourceKey=Trim}}" Header="尺码"   Width="40" />
                        <DataGridTextColumn Binding="{Binding Path=ARTDES, Converter={StaticResource ResourceKey=Trim}}" Header="描述"   Width="160" />
                        <DataGridTextColumn Binding="{Binding Path=UM}" Header="UM"   Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=QTYSTD}" Header="标量S"   Width="60" />
                        <DataGridTextColumn Binding="{Binding Path=QTYPLAN}" Header="计量P"   Width="60" />
                        <DataGridTextColumn Binding="{Binding Path=QTYACT}" Header="实量A"   Width="60" />
                        <DataGridTextColumn Binding="{Binding Path=PRSTD}" Header="标价S"   Width="40" />
                        <DataGridTextColumn Binding="{Binding Path=PREK}" Header="采购E"   Width="40" />
                        <DataGridTextColumn Binding="{Binding Path=PRPLAN}" Header="计划P"   Width="40" />
                        <DataGridTextColumn Binding="{Binding Path=VQTYSTDPRSTD, Converter={StaticResource ResourceKey=d100}}" Header="VSS"   Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=VQTYSTDPREK, Converter={StaticResource ResourceKey=d100}}" Header="VSE"   Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=VQTYSTDPRPLAN, Converter={StaticResource ResourceKey=d100}}" Header="VSP"   Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=VQTYPLANPRSTD, Converter={StaticResource ResourceKey=d100}}" Header="VPS"   Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=VQTYPLANPREK, Converter={StaticResource ResourceKey=d100}}" Header="VPE"   Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=VQTYPLANPRPLAN, Converter={StaticResource ResourceKey=d100}}" Header="VPP"   Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=VQTYACTPRSTD, Converter={StaticResource ResourceKey=d100}}" Header="VAS"   Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=VQTYACTPREK, Converter={StaticResource ResourceKey=d100}}" Foreground="Red" Header="VAE"   Width="Auto" />
                        <DataGridTextColumn Binding="{Binding Path=VQTYACTPRPLAN, Converter={StaticResource ResourceKey=d100}}" Header="VAP"   Width="Auto" />
                    </DataGrid.Columns>
                </DataGrid  >
            </StackPanel>
        </DockPanel>
    </Grid>
</local:DocumentBase>